home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / jprefixmatch.tcl.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  4.8 KB  |  52 lines

  1. {jprefixmatch.tcl
  2.  
  3. Introduction
  4. The jprefixmatch.tcl library is distributed as part of the jstools package.  It contains procedures to do prefix expansion like that done for filename completion by tcsh(1) and Emacs, or for command disambiguation under VMS.
  5.  
  6. This document describes jprefixmatch.tcl version 3.6/3.0.
  7.  
  8. Usage
  9. Accessing the Library
  10. In order to use the jprefixmatch.tcl library, it (and any other libraries it depends on) must be in your Tcl auto_path, described in tclvars(n).  Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.
  11.  
  12. Credits and Copyright
  13. Author
  14. Jay Sekora 
  15. js@bu.edu
  16. http://shore.net/~js/
  17.  
  18. Copyright
  19. The library is copyright ⌐ 1992-1994 by Jay Sekora, but may be freely copied and modified for non¡commercial purposes.  (Please contact me if you want to use it for a commercial purpose, this may be OK under some circumstances.)
  20.  
  21. Overview
  22. Procedures
  23. j:longest_match - find the longest common initial string in a list
  24. j:expand_filename - expand filename prefix as much as possible
  25.  
  26. j:longest_match
  27. Usage
  28.     j:longest_match l
  29. Argument
  30.     l - list of strings
  31.  
  32. Description
  33. This procedure finds and returns the longest common initial string in list l.  If there's no common initial string, it returs the empty list {}.  It's used by j:expand_filename for filename completion, but could also be used for things like handling abbreviations.
  34.  
  35. j:expand_filename
  36. Usage
  37.     j:expand_filename f
  38. Argument
  39.     f - initial filename prefix to be expanded
  40.  
  41. Description
  42. This procedure tries to do filename completion on the prefix f, as in Emacs and tcsh.  It returns the longest initial substring common to those filenames in the current directory that match f.  It also can be used for globbing; if f contains globbing metacharacters (`*', `?', or `[...]'), they will be expanded as in the shell.
  43.  
  44. Evolution
  45. Feel free to report bugs (and feature requests) to me, <js@bu.edu>, and I will try to deal with them.  Also, feel free to fix bugs or add features on your own and let me know how you did it.
  46.  
  47. Bugs and Limitations
  48. * The expansion of globbing metacharacters, while occasionally useful, is unlikely to be intuitive to a user.  (You might want to check for these in your code before calling j:expand_filename.)
  49.  
  50. Changes
  51. * These procedures used to be in a file called jlibrary.tcl.  Starting with version 3.6/2.0, they're in their own independent library.
  52. } {{{jdoc:xref:link {4.59 4.66 10.217 10.238 10.246 10.263 10.267 10.288 23.0 23.15 24.0 24.17 33.159 33.176}} {jdoc:xref:manpage {4.165 4.169 4.177 4.182 10.133 10.140 42.70 42.75 42.80 42.84}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 26.0 27.0 35.0 36.0 44.0 45.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.20 4.59 4.66 4.165 4.169 6.24 6.40 8.0 10.0 10.20 10.36 10.109 10.118 10.133 10.140 10.221 10.228 10.250 10.255 10.267 10.288 12.0 14.0 15.0 15.9 16.0 16.21 18.0 19.0 21.0 23.15 24.0 24.17 26.0 28.18 29.0 30.0 30.1 30.2 32.0 33.0 33.75 33.76 33.141 33.143 33.159 33.176 35.0 37.20 38.0 39.0 39.1 39.2 41.0 42.0 42.61 42.62 42.80 42.84 42.190 42.191 42.231 42.232 42.268 42.269 42.273 42.274 42.281 42.282 42.285 42.286 44.0 45.0 45.55 45.66 47.0 48.0 48.174 48.191 50.0 50.7 51.47 51.59 52.0}} {richtext:font:italic {28.17 28.18 30.1 30.2 33.75 33.76 37.19 37.20 39.1 39.2 42.61 42.62 42.190 42.191 42.231 42.232}} {richtext:font:bold {4.4 4.20 4.59 4.66 6.24 6.40 10.20 10.36 10.221 10.228 51.47 51.59}} {richtext:font:bolditalic {10.250 10.255 10.267 10.288}} {richtext:font:typewriter {4.165 4.169 10.109 10.118 10.133 10.140 15.0 15.9 16.0 16.21 23.0 23.15 24.0 24.17 28.0 28.17 33.141 33.143 33.159 33.176 37.0 37.19 42.80 42.84 42.268 42.269 42.273 42.274 42.281 42.282 42.285 42.286 45.55 45.66 48.174 48.191}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 26.0 27.0 35.0 36.0 44.0 45.0}} {richtext:font:heading2 {9.0 10.0 13.0 14.0 18.0 19.0 22.0 23.0 27.0 28.0 29.0 30.0 32.0 33.0 36.0 37.0 38.0 39.0 41.0 42.0 47.0 48.0 50.0 50.7}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:link:jstools.jdoc {4.59 4.66}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:manpage:tclvars {10.133 10.140}} {jdoc:link:jslibraries.tcl {10.217 10.238}} {jdoc:link:jslibraries.jdoc#Usage {10.246 10.263}} {jdoc:link:jslibraries.jdoc {10.267 10.288}} {{} {12.0 20.0 22.0 22.10}} {jdoc:anchorname:Credits_and_Copyright {12.0 13.0}} {jdoc:anchorname:Overview {21.0 22.0}} {jdoc:anchorname:Evolution {44.0 45.0}} {jdoc:manpage:tcsh {4.165 4.169 42.80 42.84}} {jdoc:manpage:emacs {4.177 4.182 42.70 42.75}} {jdoc:link:#j:longest_match {23.0 23.15}} {jdoc:link:#j:expand_filename {24.0 24.17 33.159 33.176}} {jdoc:anchorname:j:longest_match {26.0 27.0}} {jdoc:anchorname:j:expand_filename {35.0 36.0}}} {{abbrevstart 48.193} {matchend 6.36} {abbrevend 48.193} {insert 1.0} {anchor 1.0} {matchstart 6.24} {current 1.7}}}